package com.itdaan.portal.business.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.itdaan.portal.business.domain.RolePermission;
import com.itdaan.portal.business.mapper.RolePermissionMapper;
import com.itdaan.portal.business.service.RolePermissionService;
/**
 * @author www.itdaan.com
 */
@Service(value = "rolePermissionService")
public class RolePermissionServiceImpl implements RolePermissionService{
	
	@Autowired
	private RolePermissionMapper rolePermissionMapper;
	
	public void insert(RolePermission rolePermission) {
		rolePermissionMapper.insert(rolePermission);
	}

	public void deleteByRoleId(int roleId) {
		rolePermissionMapper.deleteByRoleId(roleId);
	}

	public List<RolePermission> getByRoleId(int roleId) {
		return rolePermissionMapper.getByRoleId(roleId);
	}

}
